add sideline-flycheck-show-error-id option#17
Merged
jcs090218 merged 2 commits intoMay 14, 2026
Conversation
Append the diagnostic ID to each rendered message via `flycheck-error-format-message-and-id' when enabled. Default `nil' preserves the existing behaviour. For LSP-backed diagnostics this surfaces codes such as `reportUnusedExpression' (basedpyright) or `E501' (ruff) alongside the message — useful for grepping documentation, configuring rule severity, or writing inline ignore comments like `# pyright: ignore[CODE]'.
jcs090218
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an opt-in
sideline-flycheck-show-error-iddefcustom (defaultnil).When non-nil, the rendered sideline message is built via
flycheck-error-format-message-and-id, so the diagnostic ID is appendedin brackets:
instead of the current
The default stays
nil, so existing users see no change.Motivation — companion to lsp-mode#5036
This is the sideline-flycheck companion to
emacs-lsp/lsp-mode#5036,
which appends the same diagnostic code to
flymakemessages. During thereview of that PR, I stated that flycheck already shows the code, but
you (@jcs090218) showed me a screenshot where no code was visible.
I searched more into it and found that your screenshot was taken in
sideline-flycheck,which renders only
flycheck-error-messageand therefore drops the ID even thoughflycheck-error-idis populated. Previously, I had only testedlsp-ui-sidelinewhich is alternative to this package.
This PR brings sideline-flycheck in line with what flymake will show
once lsp-mode#5036 lands, and matches the way
flycheck-list-errorsalready surfaces the ID column.
Changes
defcustom sideline-flycheck-show-error-id(defaultnil).flycheck-error-messageand
flycheck-error-format-message-and-id.README.mdVariables section lists the new option.Test plan
(setq sideline-flycheck-show-error-id t): ID appears in bracketsafter the message for LSP-backed diagnostics (verified with
basedpyright on Python).
must be separated by newlines or semicolons") render unchanged — no
trailing brackets, no empty
[].